const bg = document.querySelector(".bg");
const loadingText = document.querySelector(".loadingText");

let load = 0;

const interval = setInterval(blurring,30);

function blurring() {
    load++;
    loadingText.innerText = `${load}%`;
    loadingText.style.opacity = 1 - load/100;
    bg.style.filter = `blur(${20 - (load) / 100 * 30}px )`;
    if (load > 99) {
        clearInterval(interval);
    }
};
